<style>
    #sell_form span .svg {
        //float:left;
        cursor:text;
    width:14px;
    height:14px;
    }
    #sell_form .input-group-addon {
        width:42px
    }

</style>

{% load i18n %}
<div id="trade_sell"></div>
<script id="temp_sell" type="text/html">
    <form class="form-horizontal" id="sell_form" method="post" role="form">
        {% csrf_token %}
        <input type="hidden" id="use_coin_type" name="use_coin_type" value="<%=coin1%>">
        <input type="hidden" id="coin_type" name="coin_type" value="<%=coin0%>">
        <input type="hidden" id="userid" name="userid" value="{{user.id}}">

        <div class="form-group trade-form " style="padding-top:10px;">
            <label class="col-sm-offset-0 col-sm-4 col-xs-offset-1 col-xs-3 control-label red">{% trans '卖出' %} <%=coin0_info.name_upper%></label>
            <div class="col-sm-7 col-xs-7">
                <p class="control-label f-fr red">{% trans '余额' %} <span id="sell_amount" class="red f-fb">0.00</span> <%=coin0_info.name_upper%></p>
            </div>
        </div>
        <div class="form-group">
            <label for="sell_price" class="col-sm-offset-0 col-sm-3 col-xs-offset-1 col-xs-2 control-label">{% trans '价格' %}</label>
            <div class="col-sm-8 col-xs-8">
                <div class="input-group">
                    <span class="input-group-addon svg_red red"><%-$imports.get_coin_icon(coin1);%></span>
                    <input type="text" class="form-control" id="sell_price" name="price" placeholder="{% trans '卖出价格' %}">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="lastname" class="col-sm-offset-0 col-sm-3 col-xs-offset-1 col-xs-2 control-label">{% trans '数量' %}</label>
            <div class="col-sm-8 col-xs-8 ">
                <div class="input-group">
                    <span class="input-group-addon svg_red red"><%-$imports.get_coin_icon(coin0);%></span>
                    <input type="text" class="form-control" id="sell_count" name="count" placeholder="{% trans '卖出数量' %}">
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-offset-0 col-sm-3 col-xs-offset-1 col-xs-2 control-label"></label>
            <div class="col-sm-8 col-xs-8">
                <div id="h-slider2">
                    <p id="sell_percent" class="form-control-static" align="right">60%</p>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-offset-0 col-sm-3 col-xs-offset-1 col-xs-2 control-label">{% trans '金额' %}</label>
            <div class="col-sm-8 col-xs-8 ">
                <div class="input-group">
                    <span class="input-group-addon svg_red red"><%-$imports.get_coin_icon(coin1);%></span>
                    <input type="text" class="form-control" id="sell_use_amount" placeholder="{% trans '交易金额' %}"></input>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-1 col-sm-offset-1 col-xs-offset-1 col-sm-10 col-xs-offset-1 col-xs-10 ">
                {% if user.is_authenticated %}
                <button type="button" id="sell_button" class="btn btn-danger btn-block" data-toggle="tooltip">{% trans '卖出' %} <%=coin0_info.name_upper%></button>
                {% else %}
                <a href="/users/login?next=/{%url 'trade'%}" class="btn btn btn-block btn-danger">{% trans '卖出' %}<%=coin0_info.name_upper%></a>
                {% endif %}
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-1 col-xs-1 control-label"></label>
            <div class="col-sm-4 col-xs-4 ">
                <p class="form-control-static" id="sell_msg"></p>
            </div>
            <div class="col-sm-6 col-xs-6 ">
                <% var sell_fee = {{sell_fee}} * 100 %>
                <p class="control-label f-fr red">{% trans '卖出交易费' %}:<span id="buy_rate"><%=sell_fee%></span>%</p>
            </div>
        </div>
    </form>
</script>
